export type InstitutionModel = {
  createdBy: string
  createdTime: string
  delFlag: 0 | 1
  fullName: string
  id: number
  insCode: string
  insStatus: 0 | 1
  insTypeCode: string
  insTypeName: string
  notes: string
  orderIndex: number
  parentId: number
  parentName: string
  shortName: string
  updatedBy: string
  updatedTime: string
}

export interface InstitutionTreeModel {
  id: number
  name: string
  parentId: number
  rank: string
  status: number
  children: InstitutionTreeModel[]
}

const api: ApiConfig = {
  getTree: {
    method: 'GET',
    url: '/sys/sysInstitution/getTree'
  },
  list: {
    method: 'GET',
    url: '/sys/sysInstitution/list'
  },
  info: {
    method: 'GET',
    url: '/sys/sysInstitution/info/:id'
  },
  save: {
    method: 'POST',
    url: '/sys/sysInstitution/save'
  },
  delete: {
    method: 'POST',
    url: '/sys/sysInstitution/delete'
  },
  update: {
    method: 'POST',
    url: '/sys/sysInstitution/update'
  }
}

export default api
